Secrets of the Glasgow Haskell Compiler inliner
نویسندگان
چکیده
Higher-order languages, such as Haskell, encourage the programmer to build abstractions by composing functions. A good compiler must inline many of these calls to recover an e ciently executable program. In principle, inlining is dead simple: just replace the call of a function by an instance of its body. But any compilerwriter will tell you that inlining is a black art, full of delicate compromises that work together to give good performance without unnecessary code bloat. The purpose of this paper is, therefore, to articulate the key lessons we learned from a full-scale \production" inliner, the one used in the Glasgow Haskell compiler. We focus mainly on the algorithmic aspects, but we also provide some indicative measurements to substantiate the importance of various aspects of the inliner.
منابع مشابه
The Glasgow Haskell Compiler: a Technical Overview
We give an overview of the Glasgow Haskell compiler, focusing especially on way in which we have been able to exploit the rich theory of functional languages to give very practical improvements in the compiler. The compiler is portable, modular, generates good code, and is freely available.
متن کاملFormulating Haskell
The functional programming language Haskell is examined from the point of view of proving programs correct. Particular features explored include the data type deenition facilities, classes, the behaviour of patterns and guards and the monad approach to IO in the Glasgow Haskell compiler.
متن کاملRealising nondeterministic I/O in the Glasgow Haskell Compiler
In this paper we demonstrate how to relate the semantics given by the nondeterministic call-by-need calculus FUNDIO [SS03] to Haskell. After introducing new correct program transformations for FUNDIO, we translate the core language used in the Glasgow Haskell Compiler into the FUNDIO language, where the IO construct of FUNDIO corresponds to direct-call IO-actions in Haskell. We sketch the inves...
متن کاملStrictness Analysis and let-to-case Transformation using Template Haskell
Metaprogramming consists of writing programs that generate or manipulate other programs. Template Haskell is a very recent extension of Haskell, currently implemented in the Glasgow Haskell Compiler, giving support to metaprogramming at compile time. Our aim is to apply these facilities in order to statically analyse programs and transform them at compile time. In this paper we use Template Has...
متن کاملUsing Template Haskell for Abstract Interpretation
Metaprogramming consists of writing programs that generate or manipulate other programs. Template Haskell is a recent extension of Haskell, currently implemented in the Glasgow Haskell Compiler, giving support to metaprogramming at compile time. Our aim is to apply these facilities in order to statically analyse programs and transform them at compile time. In this paper we use Template Haskell ...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید
ثبت ناماگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید
ورودعنوان ژورنال:
- J. Funct. Program.
دوره 12 شماره
صفحات -
تاریخ انتشار 2002